package hesso.smartdraw.ch.guielements;

import hesso.smartdraw.ch.AddDeviceScreen;
import hesso.smartdraw.ch.DrawWallScreen;
import hesso.smartdraw.ch.model.Color;
import android.content.Context;
import android.content.Intent;

public class RoomEditButton extends Button{
	
	private int roomId;
	private int buildingId;
	private Context parent;
		
	public RoomEditButton(float pX, float pY, float pWidth, float pHeight,
			Color c, int roomId, Context parent, int buildingId) {
		super(pX, pY, pWidth, pHeight, c);
		this.parent = parent;
		this.roomId = roomId;
		this.buildingId = buildingId;
	}

	@Override
	public void actionDown() {	
        Intent intent = new Intent(parent, AddDeviceScreen.class);
        intent.putExtra("roomId", this.roomId);
        intent.putExtra("currentWallIndex", 0);
        intent.putExtra("buildingId", buildingId);
        intent.putExtra("level", ((DrawWallScreen)parent).getActualLevelId());
        parent.startActivity(intent);
	}

	public int getRoomId(){
		return roomId;
	}
	
	@Override
	public void actionMove() {}

	@Override
	public void actionUp() {}

}
